package com.caiyouxi.partner.controller;

import com.caiyouxi.common.bean.ResData;
import com.caiyouxi.partner.model.CpContractBean;
import com.caiyouxi.partner.service.CpContractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("cp_contract")
public class CpContractController {
    @Autowired
    private CpContractService service;

    @RequestMapping("delete_contract")
    public ResData delete_contract(@RequestBody CpContractBean bean){
        return service.delete_contract(bean);
    }

    @RequestMapping("insert_contract")
    public ResData insert_contract(@RequestBody CpContractBean bean){
        return service.insert_contract(bean);
    }
    @RequestMapping("select_contract")
    public ResData select_contract(@RequestBody CpContractBean bean){
        return service.select_contract(bean);
    }

    @RequestMapping("update_contract")
    public ResData update_contract(@RequestBody CpContractBean bean){
        return service.update_contract(bean);
    }
}
